package com.chance.cc.crawler.prod.command.trigger.domain.news.tenxun;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.news.tenxun.trace.TengXunNewsSimpleSchedulerCrawlerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.realtime.AutoHomeCarSeriesArticleCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author bx
 * @date 2020/12/7 0007 11:15
 */
public class TengXunNewsSimpleScheduleTrigger extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {//运行工作爬虫
        publishTengXunCarSeriesArticleRealtimeScheduleTriggerInfo(TengXunNewsSimpleSchedulerCrawlerJob.crawlerScheduler());
    }

    //车系文章
    public static void publishTengXunCarSeriesArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                AutoHomeCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Simple, "0 0 1 * * ?", "腾讯车系页文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }


}
